<?php

namespace App\Http\Controllers\App;

use App\Http\Controllers\Controller;
use App\Models\ProductImage;
use Illuminate\Http\Request;

class SettingController extends Controller
{
    /**
     * 首页轮播图
     */
    public function all()
    {
        $items = [];
        $image = [];
        $image['url'] = config('app.url') . '/uploads/swipes/4.jpg';
        $items[] = $image;
        $image['url'] = config('app.url') . '/uploads/swipes/1.jpg';
        $items[] = $image;
        $image['url'] = config('app.url') . '/uploads/swipes/2.jpg';
        $items[] = $image;
        $image['url'] = config('app.url') . '/uploads/swipes/3.jpg';
        $items[] = $image;
        return [
            'result' => 'success',
            'data' => [
                'swipes' => $items,
                'bulletin' => '平台新开，不为赚钱，只为提高大家的生活质量，欢迎常来!'
            ]
        ];
    }

    /**
     * 获取自提点地址
     * @param Request $request
     * @return array
     */
    public function getAddress(Request $request)
    {
        $province = $request->get('province');
        $city = $request->get('city');
        $county = $request->get('county');
        return [
            'result' => 'success',
            'data' => []
        ];
    }
}
